package com.zxx.pattern.flyweight.fly3;

import android.os.Handler;

/**
 * @author zxx on 2021/7/19
 */
public class TestFly3 {
    public static void main(String[] args) {
        Ticket ticket1 = TicketFactory.getTicket2("北京", "上海");
        ticket1.showTicketInfo("上铺");

        Ticket ticket2 = TicketFactory.getTicket2("北京", "上海");
        ticket2.showTicketInfo("中铺");
        System.out.println("大小1：" + TicketFactory.getTicketSize());

        Ticket ticket3 = TicketFactory.getTicket2("北京", "上海");
        ticket3.showTicketInfo("下铺");
        System.out.println("大小2：" + TicketFactory.getTicketSize());

    }
}
